﻿@model ApCMS.Models.NewsModels
@{
    ViewBag.Title = "新闻动态";
}
@section Header{
    <a href="@Url.Action("Index", "Home")" data-icon="back">返回</a>
    <h1>@(ViewBag.Title)</h1>
    <a href="@Url.Action("Index", "Home")" data-icon="grid">首页</a>
}
@if (Model != null)
{
    if (Model.ArticleCategoryList != null)
    {   
    <ul data-role="listview" data-divider-theme="e">
        @foreach (var category in Model.ArticleCategoryList)
        { <li data-role="list-divider">@(category.Name)</li>
            if (Model.ArticleList != null)
            {
                foreach (var list in Model.ArticleList.Where(p => p.CategoryId == category.ID))
                {  
                                     
            <li><a href="@Url.Action("ViewDetails", "News", new { articleId = list.ID })">@(list.Title)</a></li>                               
                }

            }
        }
    </ul>
           
    }
}